Printer and method of controlling the same

ABSTRACT

A printer including a printing head for performing printing while moving over a printing medium, a gap roller capable of rolling along a direction of moving of the printing head, and a platen bar placed so as to face the printing head and the gap roller. The printer further includes a controller for controlling a pressing force of the platen bar applied to the gap roller according to a printing end position of the printing head on the printing medium.

BACKGROUND OF INVENTION

1. Field of the Invention

The present invention relates to a printer and a method of controllingthe printer and, more particularly, to a technique effective inimproving the printing speed of a printer for printing on pages of apassbook used in a service offered by a financial institution, a bunchof slips formed of sheets of carbon paper or pressure-sensitive paper,etc.

2. Background Art

A printer used as a computer system output device has a printing headwith which characters or images are printed on a printing medium such aspaper, a mechanism (feed mechanism) for feeding the printing medium, anda control circuit for controlling the printing head and the feedmechanism. The printing head moves in a direction perpendicular to thedirection in which the printing medium is fed. With the printing headthus moving, one line of characters or a portion of an imagecorresponding to one line is printed. After printing of one line, linefeed of the printing medium is performed by the feed mechanism, thesteps of printing one line and performing line feed are repeated toperform printing on one page.

If the printing medium is limited to ordinary printing paper, a printercan be constructed basically in the above-described manner since theallowable paper thickness can be restricted. However, if a printingmedium not uniform in thickness and having a large maximum thickness isused, it is necessary to devise means for constantly maintaining thedistance (gap) between the head and the printing medium even when themedium thickness changes. That is, in the case of printing on a bankbookused as a printing medium, it is impossible to constantly maintain thegap between the printing head and the printing medium by simply feedingthe printing medium with the feed mechanism while maintaining theprinting medium in a state of facing the printing head. Also, in thecase of printing on a printing medium not uniform in thickness along thedirection of moving of the printing head, e.g., a passport or a bankbookin a country other than Japan, on which characters are printedlaterally, and which is opened along a left-right direction, or on aprinting medium having a fold, a mechanism is required which constantlymaintains the gap by continually moving the printing head or the platenso that the gap is constant while the printing head is moving in theprinting direction.

If the gap varies or an air layer exists due to a fold as describedabove, a reduction in printing quality results. The following are twotypical methods conventionally used to cope with this problem. In thefirst method, an abutment bar having an opening in correspondence with aprinting area is disposed between the platen mechanism and the printinghead, and a printing medium is inserted between the abutment bar and theplaten and is pressed against the abutment bar by the platen mechanismduring printing with the head. In this case, the printing surface of theprinting medium is maintained flush with the lower surface of theabutment bar since the surface of the printing medium is pressed againstthe abutment bar by the platen mechanism. The printing position of thehead is selected in advance in correspondence with the lower surface ofthe abutment bar. Thus, the desired head gap is maintained to ensuregood printing quality.

In the second method, a roller capable of rolling along the direction ofmoving of the head is disposed and a printing medium is inserted betweenthe roller and the platen mechanism. The platen mechanism is arranged soas to always apply a force for pressing against the roller. The rollerthereby presses the printing medium to constantly maintain the gap byremoving an air layer even if the printing medium has a fold orvariation in thickness, thus obtaining good printing quality.

The first method described above, however, requires making the printingmedium movable by releasing the pressing force of the platen bar beforethe feed mechanism starts operating to effect line feed of the printingmedium. That is, at the time of line feed of the printing medium, it isnecessary to perform the steps of releasing pressing by the platen barand thereafter making the platen bar press the printing medium. The timefor the line feed operation is increased if these steps are performed,resulting in an increase in total printing time.

In the case of the second method, line feed of the printing mediumcannot be performed when the printing medium is interposed between thehead roller and the platen mechanism. That is, if line feed is performedwhile the printing medium is pressed against the head roller by theplaten mechanism, the printing medium is creased or, if the printingmedium is carbon paper or the like, a trailing mark is left in a portionpressed against the roller. Creases in the printing medium may causetransfer failure or a reduction in printing quality. Therefore it isnecessary that line feed of the printing medium be performed when thehead roller is at the end of the platen bar out of the region where itfaces the printing medium. If feeding is performed under this condition,it is necessary to move the head to the end of the platen bar even in asituation where the amount of printing of one line is small, that is,the amount of space in one line is large. This means that the timeperiod required for moving of the printing head includes a time periodduring which printing with the head is not actually performed.

The printing time of the printer is a user's waiting time. Needless tosay, it is desirable to increase operating speed of the printer byconsidering user' convenience.

An object of the present invention is to provide a printer capable ofmaintaining high printing quality and a high printing speed even if theprinting medium has variation in thickness or has a fold, and a methodof controlling the printer so that the printer has such improvedperformance.

SUMMARY OF INVENTION

The present invention will be outlined below. That is, a printer inaccordance with the present invention includes a printing head forperforming printing while moving over a printing medium, a gap rollercapable of rolling along the direction of moving of the printing head, aplaten bar placed so as to face the printing head and the gap roller,and a controller for controlling the pressing force of the platen barapplied to the gap roller according to a printing end position of theprinting head on the printing medium.

The present invention may be understood as a method for controlling aprinter in the above-described manner.

Various other objects, features, and attendant advantages of the presentinvention will become more fully appreciated as the same becomes betterunderstood when considered in conjunction with the accompanyingdrawings, in which like reference characters designate the same orsimilar parts throughout the several views.

BRIEF DESCRIPTION OF DRAWING

FIGS. 1a and 1 b are diagrams showing an entire of a printer 1 whichrepresents an embodiment of the present invention.

FIG. 2 is a diagram showing the printer 1 and a bottom cover 8 removedfrom the printer 1.

FIG. 3 is a diagram showing the printer 1 and a platen mechanism 10removed from the printer 1.

FIG. 4 is an enlarged diagram of a portion of a printing head 6.

FIG. 5 is a side view schematically showing a state where a printingmedium 14 is inserted between a printing head and a platen bar 11.

FIGS. 6a and 6 b are front views schematically showing a state where theprinting medium 14 is inserted between the printing head and a platenbar 11.

FIG. 7 is a diagram showing an example of the platen mechanism in theembodiment of the present invention.

FIG. 8 is a diagram showing a state where a solenoid 27 is not energizedand the platen bar 11 is in an upper position.

FIG. 9 is a diagram showing a state where the solenoid 27 is energizedand the platen bar 11 is in a lower position.

FIG. 10 is a block diagram schematically showing an example of thefunctions of the printer in the embodiment of the present invention.

FIG. 11 is a flowchart showing an example of a printing control methodin the embodiment of the present invention.

FIG. 12 is a graph schematically showing states of moving of the head.

FIG. 13 is a flowchart showing an example of calculation of time T1.

FIG. 14 is a flowchart showing an example of calculation of time T2.

FIG. 15 is a diagram showing head locus with respect to times T1 and T2.

FIG. 16 is a time chart showing an example of the two kinds ofprocessing with respect to times T1 and T2.

FIG. 17 is a diagram showing an example of the head locus in the casewhere the control method of the embodiment of the present invention isused.

DETAILED DESCRIPTION

The printer in accordance with the present invention further comprises afeeding unit for moving the printing medium between the printing headand the platen bar. The controller releases the pressing force if, afterthe completion of printing of the currently printed line, the printinghead is stopped at a position on the printing medium which is one of theprinting end position with respect to the currently printed line and aprint start position with respect to printing of the next line, andrestores the pressing force after the feed means has fed the printingmedium. The controller does not release the pressing force if, after thecompletion of the printing of the currently printed line, the printinghead is stopped at a position outside the region where the printingmedium exists. The printer further comprises a unit for calculating afirst time period required for printing of the currently printed lineand the next line to be printed in the case where the pressing force isreleased, the feeding unit feeds the printing medium, and the pressingforce is then restored, and a second time period required for printingof the currently printed line and the next line to be printed in thecase where the pressing force is not released, and a unit for making adetermination as to whether the first time period is shorter than thesecond time period. The controller executes control corresponding to theshorter of the first and second time periods.

In the printer arranged as described above, the shorter of two timeperiods: the printing time in the case where the pressing force isreleased, the feed means feeds the printing medium, and the pressingforce is then restored; and the printing time in the case where thepressing force is not released is determined at the time of printing ofeach line, thereby making it possible to reduce the time required forprinting processing of the entire page. Either kind of printing controlensures high printing quality since the pressing force is applied fromthe platen mechanism when printing is performed on the printing medium.When the feeding operation is performed to effect a line feed of theprinting medium, the pressing force from the platen mechanism isreleased or the head roller is positioned out of the region where theprinting medium exists, thus preventing occurrence of creases andcoloring in carbon paper caused by the feeding operation.

The unit for calculating the first and second time periods includesmeans for obtaining a presupposed print end position with respect to thecurrently printed line, and means for obtaining a presupposed printstart position with respect to the next line to be printed, and thefirst time period (T1) can be calculated on the basis of an equation:T1=(|Xa−Xb|/Vh)+max(Tb, Td)+Tf−t+Tu+Ta, and the second time period (T2)is calculated on the basis of an equation:T2=(|Xa−Xw|/Vh)+(|Xb−Xw|/Vh)+max(Tb, Tf)+Ta. In these equations, whereXa is the presupposed printing end position; Xb is the presupposedprinting start position; Xw is the position outside the region where theprinting medium exists; Vh is the moving speed of the printing head; Tbis the time between a start of deceleration of the printing head and thecompletion of stopping of the printing head; Td is the time periodrequired for the controller to release the pressing force; Tf is thetime period required for the feeding unit to feed the printing medium tothe position corresponding to the next line to be printed; t is apossible time overlap between Td and Tf; Tu is the time period requiredfor the controller to restore the pressing force; Ta is the time periodbetween a start of acceleration of the printing head and a time at whichthe printable speed is reached; and max(a, b) is a function forselecting the larger of a and b.

The above-described controller may include a plurality of levers eachhaving one end pinned upon a lower portion of the platen bar androtatable about an axis of rotation perpendicular to a direction inwhich the platen bar is moved, and a single parallel link extendingparallel to the platen bar and pinned upon the other end of each of thelever. When the parallel link moves in a direction corresponding to thedirection of rotation of each lever, the platen bar is translated in adirection perpendicular to the direction of movement of the parallellink. In the controller arranged, the plurality of levers rotate throughthe same angle in cooperation with one link, thereby increasing theparallelism of the parallel link including the platen bar while theplaten bar is moved (upward or downward). The parallelism of the platenbar with respect to the printing head is thereby improved to ensure highprinting quality. The controller may also include a first spring forrotating the lever in a first direction such as to move the platen barupward, and a driving for applying a force to the other end of the leveror to the parallel link to make the lever rotate in a second directionopposite to the first direction. These elements enable the platen bar tobe normally pressed against the head roller, but act to release thepressing force when the drive means is energized. An elastic member(e.g., a coil spring) may also be provided between the other end of thelever or the parallel link and the drive means to buffer the driveimpact.

The above-described printing head may be selected from a wire dotprinting head, a bubble jet printing head, an ink jet printing head, athermal transfer type of printing head, and a thermal sublimation typeof printing head. The printing head may have a sensor for detectingedges of the printing medium. The printing medium may be of such a typeas to have variation in thickness along the direction of reciprocalmoving of the printing head.

An embodiment of the present invention will be described in detail withreference to the accompanying drawings. However, the present inventioncan be implemented in various forms and the contents of the embodimentdescribed below are not to be construed to limit the invention.Throughout the description of the embodiment, the same components areindicated by the same reference numerals.

FIGS. 1A and 1B illustrate the entire of a printer 1 which represents anembodiment of the present invention. FIG. 1A shows the printer 1 and atop cover 2 removed from the printer 1. FIG. 1B is a diagramschematically showing internal mechanisms as if they are seen through afront panel 3. A printing medium, e.g., a sheet of paper is transported(fed) by a sheet feed mechanism along directions indicated by arrows 5in a state of being put on a tray 4. The printing medium is assumed tohave a generally rectangular shape. If the printing medium is in anoblique position when transported, the sheet feed mechanism detects itand ejects the printing medium. The sheet feed mechanism or relatedmeans includes a sensor for detecting such an obliquely transportedstate. Details of these components will not be described in thisspecification.

A printing head 6 is provided in the printer 1. The printing head 6 canmove reciprocally along directions indicated by arrows 7. The printinghead 6 prints one line on the printing medium in one pass. The printinghead 6 is, for example, a wire dot head. However, the printing head 6 isnot limited to the wire dot type, and it may alternatively be, forexample, a bubble jet printing head, an ink jet printing head, a thermaltransfer type of printing head, or a thermal sublimation type ofprinting head.

FIG. 2 is a diagram showing the printer 1 and a bottom cover 8 removedfrom the printer 1. A control circuit 9 is provided on the bottom cover8. The control circuit 9 has semiconductor devices having a computationfunction and a data storage function and constituting an electroniccircuit. The control circuit 9 have the functions of controlling thesheet feed mechanism, a printing head moving mechanism, the printinghead, a platen mechanism, etc., as described below in detail.

FIG. 3 is a diagram showing the printer 1 and the platen mechanism,indicated by 10, removed from the printer 1. The platen mechanism 10 isplaced below the printing head 6. The platen mechanism 10 has a platenbar 11 capable of moving upward and downward, as described below. Theplaten bar 11 has a length longer than the range through which theprinting head 6 moves. The platen bar 11 is made of, for example, aresin or hard rubber. If the platen bar 11 is made of a resin or hardrubber having certain elasticity, the printing quality in the case ofconstructing the printing head as a wire dot type in particular can beimproved.

FIG. 4 is an enlarged diagram of a portion of the printing head 6. Thecircular area in FIG. 4 shows a side view of the printing head 6 forexplanation of the positional relationship between the platen bar 11 andthe printing head 6. The printing head 6 is provided with a head gaproller 12 capable of rolling along the direction of moving of theprinting head 6 (indicated by arrows 7). A shaft 13 on which the headgap roller 12 rotates is fixed on the printing head 6, so that the gapof the printing head 6 is determined by the peripheral surface of thehead gap roller 12. In this embodiment, the gap is adjusted to 0.28 to0.33 mm. Actually, an ink ribbon, not specified in this embodiment, isinserted between a printing medium and the printing head 6

FIG. 5 is a side view schematically showing a state where a printingmedium 14 is inserted between the printing head and the platen bar 11,and FIG. 6 is a corresponding front view. In FIG. 5 are also illustratedfront feed rollers 15 and back feed rollers 16 in the mechanism forfeeding the printing medium 14. As the front feed rollers 15 and theback feed rollers 16 rotate, the printing medium 14 is transported orejected. The printing head 6 has an optical sensor 6 a having thefunctions of sensing the existence of the printing medium 14 anddetecting edges of the printing medium 14.

The platen bar 11 is always urged by a spring 17 in an upward direction(toward the head gap roller 12) as long as the pressing force is notreleased by a drive mechanism described below. The printing medium 14 isthereby maintained in a state of being pressed against the head gaproller 12 to remove creases in the printing medium and an air layerformed along the printing medium, so that the gap between the printingmedium 14 and the printing head 6 is adjusted within the above-mentionedrange. Also, even if the printing medium 14 is not uniform in thicknessalong the direction of moving of the printing head 6 as shown in FIGS.6A and 6B, the gap between the gap between the printing medium 14 andthe printing head 6 can be adjusted within the above-mentioned range.FIG. 6A shows a state where the printing head 6 is located on a regionof the printing medium 14 where the thickness is large, and FIG. 6Bshows a state where the printing head 6 is located on a region of theprinting medium 14 where the thickness is small. In the state shown inFIG. 6A, the platen bar 11 is moved downward by the head gap roller 12through the printing medium 14. In the state shown in FIG. 6B, theplaten bar 11 is moved upward. Thus, even if the thickness of theprinting medium 14 changes, the height of the platen bar 11 is suitablycontrolled and the gap between the printing medium 14 and the printinghead 6 is always adjusted within the suitable range.

In the above-described arrangement, the reaction force received by theprinting head 6 from the platen bar 11 varies depending upon theposition of the platen bar 11. The reaction force is minimized at eachof the left and right ends of the platen bar and is maximized at aposition about the center of the platen bar in the lengthwise directionof the same since it is the resultant of the moments of the springs 17.Therefore, if the printing medium 14 is a bankbook or the like, aproblem described below may be encountered. That is, when printing isperformed on a number of superposed sheets of the bank book at aposition about the center of the platen bar 11, the printing medium 14is depressed by the head gap roller 12 with the larger reaction force toreduce the distance between the head face and the platen bar 11. Thus,such variation in reaction force is liable to cause a reduction inprinting quality. In this embodiment, therefore, the platen mechanismsown in FIG. 7 is used.

FIG. 7 is a diagram showing an example of the platen mechanism in thisembodiment. The platen mechanism 10 of this embodiment has a lever 18and a link bar 19. The lever 18 is swingably supported on a shaft 20.Also, the lever 18 is pinned upon a bottom portion of the platen bar 11at a point 21 and also pinned upon the link bar 19 at a point 22. Thatis, when the link bar 19 moves in the direction of arrow 23, the platenbar 11 moves in the direction of arrow 24. A similar lever 18, not shownin FIG. 7, is also provided at the right end of the link as viewed inthe figure. In this arrangement, even though the position at which theplaten bar 11 receives pressure changes, the desired parallelism of theplaten bar 1 is maintained according to the characteristic of theparallel link formed by the link bar 19, so that the platen bar 11 has aconstant pressing force regardless of the point of application of theforce.

In this embodiment are also provided a spring 25, a spring 26, asolenoid 27 and a stopper 28. The spring 25 is adapted to constantlyproduce such a force as to rotate the lever 18 in the direction oppositeto the direction of arrow 24. The spring 26 is provided to buffer themovement of the solenoid 27. The solenoid 27 is energized to produce aforce with which the link bar 19 is moved in the direction of arrow 23.This force is applied to the lever 18 through the spring 26, therebyrotating the lever 18 in the direction corresponding to the direction ofarrow 24. That is, when the solenoid 27 is energized, the platen bar 11is set in a downwardly displaced position. Needless to say, to enablethis movement of the solenoid 27 to be transmitted to lever 18, it isnecessary to set the elastic modulus of the spring 26 to a valuesufficiently larger than that of the spring 25. The stopper 28 is set todetermine the upper limit of the platen bar 11.

The platen mechanism 10 arranged as described above is used to maintainthe desired parallelism of the platen bar 11 by the lever 18 and thelink bar 19 with respect to a downwardly-pressing force applied to theplaten bar 11 at one point, regardless of the position of the point ofapplication of the force. Also, the reaction force against thedownwardly-pressing force can be obtained by using the spring 25.Further, the platen bar 11 can be set in a downwardly set position bythe solenoid 27. FIG. 8 is a diagram showing a state where the solenoid27 is not energized and the platen bar 11 is in an upper position, andFIG. 9 shows a state where the solenoid 27 is energized and the platenbar 11 is in a lower position. The solenoid has been described as meansfor moving the platen bar 11 by way of example. However, any other drivemechanism, e.g., a rotary motor may alternatively be used.

FIG. 10 is a block diagram schematically showing an example of thefunctions of the printer in this embodiment. The printer 1 in thisembodiment has interface means 30, a printer control means 31,calculation means 32, front panel 33, printing signal generation means34, printing head drive control means 35, platen drive control means 36,sheet feeder drive control means 37, sheet edge detection means 38, anddata storage means 39.

The interface means 30 performs interfacing with a host unit 40. Variouscontrol signals, data, etc., from the host unit 40 are transmitted tothe printer control means 31. The printer control means 31 controls theentire of the printer 1. The calculation means 32 performs various kindsof calculation including those described below by way of example. Thefront panel 33 accepts control signals input by a user directlyoperating the panel 33. The printing signal generation means 34generates a printing signal which is transmitted to the printing head 6.For example, the printing signal generation means 34 generates signalsfor driving wires for forming wire dots. The printing head drive controlmeans 35 generates a signal which is supplied to a drive means 41 suchas a motor for driving the printing head 6 in the direction indicated byarrow 7 in FIG. 1. The platen drive control means 36 generates a controlsignal which is supplied to the above-described solenoid 27, forexample. The sheet feeder drive control means 37 generates a controlsignal which is supplied to, for example, a motor for driving theabove-described front feed rollers 15 and the back feed rollers 16. Thesheet edge detection means 38 receives, for example a signal from theabove-described optical sensor 6 a to detect a sheet end of a printingmedium. The data storage means 39 includes a RAM (random access memory)and a ROM (read only memory). Data from the host unit 40, for example,is stored in the RAM, and a control program for controlling the printer,for example, is stored in the ROM.

FIG. 11 is a flowchart showing an example of a printing control methodin this embodiment. Control of printing of one page will be described byway of example.

First, data corresponding to one page is received from the host unit(step 50). The received data can be stored in the above-described datastorage means 39. From the received one-page data, the number of lines Mon the page is obtained and recorded (step 51). Needless to say, data Mobtained at this step and calculation data, etc., described below can bestored in the data storage means 39. While the following is thedescription of a method of performing control after receiving the entireof printing data on one page, it is, of course, possible to use a methodof successively determining control steps on the basis of printing dataabout at least two preceding lines.

Next, printing of the first line is executed (step 52). In this printingof the first line, the printing head 6 is moved through the entire rangethrough which the printing head 6 is movable, thereby measuring an edgeof the printing medium (step 53). Measurement of the edge of theprinting medium is performed by the above-described sheet edge detectionmeans 38. A presupposed head stop position W is set outside the detectededge of the printing medium (step 54). At this position W, no printingmedium 14 portion exists. When the printing head 6 is at the position W,feeding of the printing medium can be performed without moving theplaten bar downward. The head position after printing of the first lineand moving of the head for this printing is the position W, at whichline feed can be made without moving the platen bar downward (step 52).

Next, N=2 is set (step 55) and printing of the Nth line is started (step56). For starting printing, the head is moved to a predeterminedprinting start position and printing is performed by driving the headwires. Ordinarily, the necessary time period between the start and endof this printing is several hundred milliseconds. During this timeperiod, calculations and determinations described below can be made.

Calculations and determinations will be made as described below. First,the printing end position at which printing of the Nth line will becompleted is calculated. The printing end position can be calculated byextracting data on the Nth line from the one-page data received in step50 and by referring to the position of the trailing end of the sequenceof characters in the line. A head stop position Xn at which the head isstopped after the completion of printing is then obtained by adding adeceleration distance to the printing stop position (step 57).Ordinarily, possible states of the printing head 6 include anaccelerated state between the stopped state and a constant-speed statein which the head can operates for printing, the constant-speed state,and a decelerated state between the constant-speed state and the stoppedstate. FIG. 12 schematically shows such head states. At time Ta,acceleration is started. The head is accelerated until time Tb. Fromtime Tb to time Tc, the head speed is maintained at a constant speed Vh.During this time period, printing can be performed. At time Tc, printingis stopped and a head stopping operation is started. At time Td, thehead is stopped. Even if the head stopping operation is startedsubstantially simultaneously with the time at which printing isterminated, the head moves through some distance, i.e., theabove-mentioned deceleration distance, during the deceleration period(Tc to Td).

Next, the position at which printing of the (N+1)th line will be startedis calculated. This printing start position can be calculated byextracting data on the (N+1)th line from the one-page data received instep 50 and by referring to the position of the leading end of thesequence of characters in the line. This “leading end” and theabove-mentioned “trailing end” denote positions in order of appearanceof characters in the direction of moving of the head. The printing startposition Xn+1 from the head stop position is then obtained by adding theacceleration distance (step 58).

Next, printing time T1 for printing of the Nth line and the (N+1)th linein the case where the head is moved to the above-described position Wand printing time T2 for printing of the Nth line and the (N+1)th linein the case where the head is stopped at the position Xn or Xn+1 arecalculated (step 59). The lengths of time T1 and time T2 therebycalculated are compared (step 60).

If time T1 is shorter, the following processing is performed. Afterprinting of the Nth line, the head is moved to the position W withoutbeing stopped at the printing end position, and is stopped at theposition W (step 61). Thereafter, a line feed (sheet feed) is madewithout moving the platen downward (that is, the platen bar ismaintained in the same position) (step 62).

If time T2 is shorter, the head is stopped at the position Xn bystopping moving of the head immediately after the completion of printingof the Nth line, or is stopped at the position Xn+1 (step 63). Thesolenoid of the platen mechanism is then energized to move the platenbar downward (step 64) and the line feed operation is performed (step65). Thereafter, the solenoid of the platen mechanism is deenergized tomove the platen bar upward (step 66).

As described above, printing is controlled in such a manner that twotime periods for printing are compared, the shorter of the two timeperiods is determined, and one line feed operation including moving thehead beyond the edge of the printing medium and the other line feedoperation including the platen bar downward, corresponding to theshorter time period, is performed. It is possible to reduce the printingtime by using this control method.

After the completion of step 62 or 66, N=N+1 is set (step 67) and adetermination is made as to whether N is larger than M, that is, whetherprocessing of data on the page has been completed (step 68). If N islarger than M, the process is terminated. If N is not larger than M, theprocess returns to step 56 and the above-described steps are repeated,thus performing processing for printing on one page.

Calculations of time T1 and T2 will be described in detail. FIG. 13 is aflowchart showing an example of the process of calculating time T1, andFIG. 14 a flowchart showing an example of the process of calculatingtime T2.

To calculate T1, time Tm1 required for moving of the head through |Xn−W|is first calculated (step 70). Next, time Tm2 required for moving of thehead through |Xn+1−W| is calculated (step 71). Then, the headacceleration time Ta and head deceleration time Tb are added to Tm1+Tm2to obtain Tm (step 72). Further, feed time Tf is added to Tm to obtainT1 (step 73). To calculate T2, time Tm3 required for moving of the headthrough |Xn−Xn+1| is first calculated (step 74). Next, head accelerationtime Ta and head deceleration time Tb are added to Tm3 to obtain Tm(step 75). Further, platen down time Tpd, feed time Tf and platen bar uptime Tpu are added to Tm to obtain T2 (step 76).

FIG. 15 is a diagram showing the head loci with respect to theabove-described times T1 and T2. The locus in the case where the head ismoved to the position W is indicated by the broken line, and the locusin the case where the head is stopped at the position Xn+1 is indicatedby the solid line. The head move distance (|Xn−W| and |Xn+1−W|) in theblank in the case where the head is moved to the position W, is longerthan the head move distance (|Xn−Xn+1|) in the case where the head isstopped at the position Xn+1. Processing corresponding to the shorter ofthe moving time corresponding to the difference between these distancesand the time for moving the platen bar downward and upward is selected.

FIG. 16 is a time chart showing an example of the above-described twokinds of processing. In actuality, the sheet feed or platen bar downoperation can be started immediately after a start of deceleration, andsheet feed can be started before the completion of the platen bar downoperation. Therefore the total printing time can be reduced by thelengths of time overlaps thereby created.

Thus, time T1 and time T2 can be calculated on the basis of thefollowing equations:

T1=(|Xa−Xb|/Vh)+max(Tb, Td)+Tf−t+Tu+Ta,

and

 T2=(|Xa−Xw|/Vh)+(|Xb−Xw|/Vh)+max(Tb, Tf)+Ta.

In these equations, Xa is a presupposed printing end position; Xb is apresupposed printing start position; Xw is a position outside the regionwhere the printing medium exists; Vh is the printing head move speed; Tbis the time between a start of deceleration of the printing head and thecompletion of stopping of the printing head; Td is the time periodrequired for the platen mechanism to release the pressing force; Tf isthe time period required for the feed mechanism to feed the printingmedium to the position corresponding to the next line to be printed; tis a possible time overlap between Td and Tf; Tu is the time periodrequired for the platen mechanism to restore the pressing force; Ta isthe time period between a start of acceleration of the printing head anda time at which the printable speed is reached; and max(a, b) is afunction for selecting the larger of a and b.

FIG. 17 is a diagram showing an example of the head locus in the casewhere the above-described control method is used. When the printing head6 is located on the printing medium 14, the platen bar is moved downwardto enable line feed. When the printing head 6 is located outside theregion corresponding to the printing medium 14, a line feed is madewithout moving the platen bar downward.

In the printer and the control method of the above-described embodiment,the speed of printing even on a printing medium having a hold orvariation in thickness can be increased while maintaining the desiredprinting quality.

The present invention has been described with respect to the embodimentthereof. However, the present invention is not limited to the describedembodiment and various modifications and changes of the embodiment maybe made without departing from the scope of the invention.

For example, while a bankbook or the like has been mentioned as anexample of the printing medium having a fold and variation in thickness,ordinary paper, carbon paper, etc., may also be used. Also, while anexample of the head roller having a cylindrical shape has beendescribed, the head roller may alternatively have a conical or sphericalshape.

The arrangement which typifies the present invention disclosed has theadvantages of enabling the printing apparatus to maintain high printingquality and increasing the printing speed of the printing apparatus.

It is to be understood that the provided illustrative examples are by nomeans exhaustive of the many possible uses for my invention.

From the foregoing description, one skilled in the art can easilyascertain the essential characteristics of this invention and, withoutdeparting from the spirit and scope thereof, can make various changesand modifications of the invention to adapt it to various usages andconditions.

It is to be understood that the present invention is not limited to thesole embodiment described above, but encompasses any and all embodimentswithin the scope of the following claims:

What is claimed is:
 1. A printer, comprising: a printing head forperforming printing while moving over a printing medium; a gap rollercapable of rolling along a direction of moving of said printing head; aplaten bar placed so as to face said printing head and said gap roller;a feeding unit for moving the printing medium between said printing headand said platen bar; a unit for calculating a first time period requiredfor printing of the currently printed line and the next line to beprinted in the case where the pressing force is released, the feedingunit feeds the printing medium, and the pressing force is then restored,and a second time period required for printing of the currently printedline and the next line to be printed in the case where the pressingforce is not released; a unit for making a determination as to whetherthe first time period is shorter than the second time period; and acontroller for controlling a pressing force of said platen bar appliedto said gap roller according to a printing end position of said printinghead on the printing medium, wherein said controller releases thepressing force if, after the completion of printing of the currentlyprinted line, said printing head is stopped at a position on theprinting medium which is one of the printing end position with respectto the currently printed line and a print start position with respect toprinting of the next line, and restores the pressing force after saidfeeding unit has fed the printing medium, said controller does notrelease the pressing force if, after the completion of the printing ofthe currently printed line, said printing head is stopped at a positionoutside the region where the printing medium exists, and said controllerexecutes control corresponding to the shorter of the first and secondtime periods.
 2. The printer according to claim 1, wherein said unit forcalculating the first and second time periods includes: a unit forobtaining a presupposed print end position with respect to the currentlyprinted line; and a unit for obtaining a presupposed print startposition with respect to the next line to be printed, wherein the firsttime period (T1) is calculated on the basis of an equation:T1=(|Xa−Xb|/Vh)+max(Tb, Td)+Tf−t+Tu+Ta, (where Xa is the presupposedprinting end position; Xb is the presupposed printing start position; Vhis the moving speed of said printing head; Tb is the time between astart of deceleration of the printing head and the completion ofstopping of said printing head; Td is the time period required for saidcontroller to release the pressing force; Tf is the time period requiredfor said feeding unit to feed the printing medium to the positioncorresponding to the next line to be printed; t is a possible timeoverlap between Td and Tf; Tu is the time period required for saidcontroller to restore the pressing force; Ta is the time period betweena start of acceleration of said printing head and a time at which theprintable speed is reached; and max(a, b) is a function for selectingthe larger of a and b), and the second time period (T2) is calculated onthe basis of an equation: T2=(|Xa−Xb |/Vh)+(|Xb−Xw|/Vh)+max(Tb, Tf)+Ta(where Xw is the position outside the region where the printing mediumexists, and other terms are the same as those in the above equation). 3.The printer according to claim 1, wherein said controller comprises: aplurality of levers each having one end pinned upon a lower portion ofsaid platen bar and rotatable about an axis of rotation perpendicular toa direction in which said platen bar is moved; and a single parallellink extending parallel to said platen bar and pinned upon the other endof each of said lever, wherein as said parallel link moves in adirection corresponding to the direction of rotation of said lever, saidplaten bar is translated in a direction perpendicular to the directionof movement of said parallel link.
 4. The printer according to claim 3,wherein said controller further comprises: a first spring for rotatingsaid lever in a first direction such as to move said platen bar upward;and a driving unit for applying a force to the other end of said leveror to said parallel link to make said lever rotate in a second directionopposite to the first direction.
 5. The printer according to claim 4,wherein an elastic member is provided between the other end of saidlever or said parallel link and said driving unit.
 6. The printeraccording to claim 1, wherein said printing head is a wire dot printinghead.
 7. The printer according to claim 6, wherein said printing headhas a sensor for detecting an edge of the printing medium.
 8. Theprinter according to claim 1, wherein the printing medium is not uniformin thickness along the direction of moving of said printing head.
 9. Theprinter according to claim 1, wherein said printing head is a bubble jetprinting head.
 10. The printer according to claim 1, wherein saidprinting head is an ink jet printing head.
 11. The printer according toclaim 1, wherein said printing head is a thermal transfer type ofprinting head.
 12. The printer according to claim 1, wherein saidprinting head is a thermal sublimation type of printing head.
 13. Amethod of controlling a printer having a printing head for performingprinting while moving over a printing medium, a gap roller capable ofrolling along the direction of moving of the printing head, a platen barplaced so as to face the printing head and the gap roller, a controllerfor controlling the pressing force of the platen bar applied to the gaproller according to a printing end position of the printing head on theprinting medium, and a feeding unit for moving the printing mediumbetween the printing head and the platen bar, comprising the steps of:starting printing of a currently printed line; calculating a first timeperiod required for printing of the currently printed line and the nextline to be printed in a case where after the completion of printing ofthe currently printed line the printing head is stopped at a position onthe printing medium which is one of the printing end position withrespect to the currently printed line and a print start position withrespect to printing of the next line, the pressing force is released,the feeding unit feeds the printing medium, and the pressing force isthen restored; calculating a second time period required for printing ofthe currently printed line and the next line to be printed in a casewhere after the completion of the printing of the currently printed linethe printing head is stopped at a position outside the region where theprinting medium exists, and the feeding unit feeds the printing mediumwhile the pressing force is not released; and making a determination asto whether the first time period is shorter than the second time period.14. The method of controlling a printer according to claim 13, whereinif the result of the determination as to whether the first time periodis shorter than the second time period is true, further include thesteps of: stopping the printing head at the printing end position withrespect to the currently printed line and the print start position withrespect to the next line to be printed, after the completion of theprinting of the currently printed line; releasing the pressing force;feeding the printing medium for a line feed; restoring the pressingforce; and starting printing of the next line to be printed areexecuted, and wherein, if the result of the determination as to whetherthe first time period is shorter than the second time period is false,the includes steps of: stopping the printing head at the positionoutside the region where the printing medium exists after the completionof the printing of the currently printed line; feeding the printingmedium for a line feed and while the pressing force is nor released; andstarting printing of the next line to be printed are executed.
 15. Themethod of controlling a printer according to claim 14, wherein theprinting head has a sensor for detecting an edge of the printing medium,further comprising the steps of: detecting two edges of the printingmedium at the time of printing of the first line on the printing medium;and recording a position outside the region between the edges as theposition outside the region where the printing medium exists.
 16. Themethod of controlling a printer according to claim 15, wherein saidsteps of calculating the first and second time periods comprise thesteps of: obtaining a presupposed print end position with respect to thecurrently printed line; and obtaining a presupposed print start positionwith respect to the next line to be printed, wherein the first timeperiod (T1) is calculated on the basis of an equation:T1=(|Xa−Xb|/Vh)+max(Tb, Td)+Tf−t+Tu+Ta, (where Xa is the presupposedprinting end position; Xb is the presupposed printing start position; Vhis the moving speed of said printing head; Tb is the time between astart of deceleration of the printing head and the completion ofstopping of said printing head; Td is the time period required for saidcontroller to release the pressing force; Tf is the time period requiredfor said feeding unit to feed the printing medium to the positioncorresponding to the next line to be printed; t is a possible timeoverlap between Td and Tf; Tu is the time period required for saidcontroller to restore the pressing force; Ta is the time period betweena start of acceleration of said printing head and a time at which theprintable speed is reached; and max(a, b) is a function for selectingthe larger of a and b), and the second time period (T2) is calculated onthe basis of an equation: T2=(|Xa−Xw|/Vh)+(|Xb−Xw|/Vh)+max(Tb, Tf)+Ta(where Xw is the position outside the region where the printing mediumexists, and other terms are the same as those in the above equation).17. The method of controlling a printer according to claim 13, furthercomprising of the step of having a printing head that is a wire dotprinting head.
 18. The method of controlling a printer according toclaim 13, further comprising the step of using the printing medium isnot uniform in thickness along the direction of reciprocal moving of theprinting head.
 19. The method of controlling a printer according toclaim 13, further comprising of the step of having a printing head thatis a bubble jet printing head.
 20. The method of controlling a printeraccording to claim 13, further comprising of the step of having aprinting head that is an ink jet printing head.
 21. The method ofcontrolling a printer according to claim 13, further comprising of thestep of having a printing head that is a thermal transfer type ofprinting head.
 22. The method of controlling a printer according toclaim 13, further comprising of the step of having a printing head thatis a thermal sublimation type of printing head.